class Vehicle(object):
    def move(self):
        pass

class Bike(Vehicle):
    def move(self):
       print("自行车以时速15km/h的速度移动")

class Car(Vehicle):
    def move(self):
        print("汽车以时速80km/h的速度移动")

class Plane(Vehicle):
    def move(self):
        print("飞机以时速900km/h的速度移动")

class RHRail(Vehicle):
    def move(self):
        print("高铁以时速250km/h的速度移动")

class Ship(Vehicle):
    def move(self):
        print("船以时速50km/h的速度移动")


def moveToBJ(vehicle):
    if isinstance(vehicle,Vehicle):
        vehicle.move()
    else:
        raise TypeError("必须传入交通工具")
class A():
    pass



if __name__ == '__main__':
    moveToBJ(Bike())
    moveToBJ(Ship())
    moveToBJ(Car())
    moveToBJ(RHRail())
    moveToBJ(Plane())
    moveToBJ(A())